package com.example.tests;

import static org.testng.AssertJUnit.assertFalse;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import java.util.Random;

import org.testng.annotations.Test;

import com.example.framework.GroupHelper;
import com.example.framework.Groups;
import com.example.objects.GroupObject;

public class GroupRemovalTests extends TestBase {

	@Test
	public void testSomeGroupCanBeRemoved() throws Exception {
		Groups oldGroups = app.getGroupHelper().getGroups();
		GroupObject someGroup = oldGroups.getSomeGroup();
		app.getGroupHelper().deleteGroup(someGroup);
		Groups newGroups = app.getGroupHelper().getGroups();
		assertThat(newGroups, equalTo(oldGroups.without(someGroup)));
	}

}